#include <iostream>
using namespace std;

int main()
{
	int n, a, b;
	float x, y;
	cin >> n;
	cin >> a >> b;
	x = b * 1.0 / a;
	for(int i = 1; i < n; i++)
	{
		cin >> a >> b;
		y = b * 1.0 / a;
		if(x - y > 0.05)
			cout << "worse" << endl;
		else if(y - x > 0.05)
			cout << "better" << endl;
		else
			cout << "same" << endl;
	}
	return 0;
 } 
